package com.kushe.util;

import com.kushe.entity.Message;
import com.kushe.entity.Notice;
import com.kushe.entity.Order;
import com.kushe.entity.User;

import java.io.File;
import java.util.List;

/**
 * Created by WhiteBlue on 15/5/21.
 */
public class SessionEnv {
    private User user;

    private List<Message> list_message;//私信消息
    private List<Notice> list_notice;//留言消息
    private List<Notice> list_order;//订单消息

    private File file1;
    private File file2;

    private Order order;

    private String token;

    public void clearFiles() {
        this.file1 = null;
        this.file2 = null;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public void setList_message(List<Message> list_message) {
        this.list_message = list_message;
    }

    public List<Notice> getList_order() {
        return list_order;
    }

    public void setList_order(List<Notice> list_order) {
        this.list_order = list_order;
    }

    public void setList_notice(List<Notice> list_notice) {
        this.list_notice = list_notice;
    }

    public List<Message> getList_message() {
        return list_message;
    }

    public List<Notice> getList_notice() {
        return list_notice;
    }

    public boolean getFlag() {
        if (list_message.isEmpty() && list_notice.isEmpty() && list_order.isEmpty())
            return false;
        else
            return true;
    }

    public File getFile1() {
        return file1;
    }

    public void setFile1(File file1) {
        this.file1 = file1;
    }

    public File getFile2() {
        return file2;
    }

    public void setFile2(File file2) {
        this.file2 = file2;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public Order getOrder() {
        return order;
    }

    public void setOrder(Order order) {
        this.order = order;
    }
}
